package com.ruoyi.mqtt.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * Mqtt 属性配置类
 * @author 0000
 */
@Component
@Configuration
@Setter
@Getter
public class MqttConfig {

    /**
     * 用户名
     */
    @Value("${spring.mqtt.username}")
    private String username;

    /**
     * 连接密码
     */
    @Value("${spring.mqtt.password}")
    private String password;

    /**
     * 连接地址
     */
    @Value("${spring.mqtt.urls}")
    private String urls;

    /**
     * clientId 唯一不能重复
     */
    @Value("${spring.mqtt.clientId}")
    private String clientId;
    /** automaticReconnection 是否自动重连 默认false */
    private boolean automaticReconnection = true;
    /**
     *  连接超时
     */
    @Value("${spring.mqtt.completionTimeout}")
    private int completionTimeout;
}
